package com.hagos;

import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.TextView;
import android.util.Log;

public class FooIntent extends Activity {
    /** Called when the activity is first created. */

	TextView tview = null;
	int i = 0;

   @Override
   public void onCreate(Bundle savedInstanceState)
   {
      super.onCreate(savedInstanceState);
		tview = (TextView)findViewById(R.id.textview);
      setContentView(R.layout.main);
		
		Log.i("Value of tview",(tview == null));
		
		i++;
   }
	
	public boolean onTouchEvent(MotionEvent event){
		//super.onTouchEvent(event);
		//startActivity(new Intent("com.hagos.FOO"));
		
		String stemp = "";
		//int history_size = event.getHistorySize();
		//int pointer_count = event.getPointerCount();
		//stemp = "History Size : " + history_size + " |  Pointer Count : " + pointer_count;
		stemp = stemp + i;
		tview.setText(stemp);
		return true;
	}
	
	public boolean onKeyDown(int keyCode, KeyEvent event){
		super.onKeyDown(keyCode,event);
		Intent intent = new Intent("com.hagos.FOO");
		startActivity(intent);
		return true;
	}

}
